import React , {Component} from 'react';
import { Row, Col, Card } from 'antd';
import EditableTable from './EditableTable';

class AdvancedTables extends Component{
    constructor(props){
        super(props)
        this.state = {
            reqId : ""
        }
    }
    // componentDidMount(){
    //     console.log(this.props)
	// 	 let id = this.props.location.query.id
    //      this.setState({
    //         reqId : id
    //      })
    //      console.log(id)
    // }
    // //props改变时触发
    // componentWillReceiveProps (nextProps){
    //     if(this.state.reqId !== nextProps.location.query.id){
    //         this.setState({
    //             reqId : nextProps.location.query.id
    //          },()=>{
    //              console.log(this.state.reqId)
    //          })
    //     }
    // }
    render(){
        return(
            <div className="gutter-example">
                <div>{this.state.reqId}</div>
                <Row gutter={16}>
                <Col className="gutter-row" md={24}>
                        <div className="gutter-box">
                            <Card title="可编辑" bordered={false}>
                                <EditableTable />
                            </Card>
                        </div>
                    </Col>
                </Row>
            </div>
        )
    }
}

export default AdvancedTables